home *** CD-ROM | disk | FTP | other *** search
/ Aminet 44 / Aminet 44 (2001)(GTI - Schatztruhe)[!][Aug 2001].iso / Aminet / game / patch / WHDIGamesA-B.lzh / AlienBreedStory.lha / AlienBreedStoryHD / Install_StoryDisk < prev    next >
Text File  |  2000-06-16  |  3KB  |  158 lines

  1. ;****************************
  2.  
  3. (set #sub-dir "data")        ;sub directory containing data files
  4. (set #readme-file "AlienBreedStory.readme")    ;name of readme file
  5. (set #cleanup "")        ;files to delete after install
  6.  
  7. ;****************************
  8.  
  9. ;----------------------------
  10. ; Checks if given program is reachable via the path
  11. ; if not abort install
  12. ; IN:  #program - to check
  13. ; OUT: -
  14.  
  15. (procedure P_chkrun
  16.   (if
  17.     (= 0 (run ("cd SYS:\nWhich %s" #program)))
  18.     ("")
  19.     (abort ("You must install \"%s\" first !\nIt must be accessible via the path.\nYou can find it in the whdload package." #program))
  20.   )
  21. )
  22.  
  23. ;----------------------------
  24. ; Wait for inserting disk
  25. ; IN:  #AD_disk - name of disk
  26. ; OUT: -
  27.  
  28. (procedure P_disk
  29.   (askdisk
  30.     (dest #AD_disk)
  31.     (prompt ("\nInsert Disk \"%s\" in any drive !" #AD_disk))
  32.     (help @askdisk-help)
  33.   )
  34. )
  35.  
  36.  
  37. ;****************************
  38.  
  39. (message ("This installation script will install Alien Breed Story disk.\n\Use corresponding script to install game disks."))
  40.  
  41. (if
  42.   (exists #readme-file)
  43.   (if 
  44.     (= 0 (run ("SYS:Utilities/Multiview %s" #readme-file)))
  45.     ("")
  46.     (run ("SYS:Utilities/More %s" #readme-file))
  47.   )
  48. )
  49.  
  50. (set #program "WHDLoad")
  51. (P_chkrun)
  52.  
  53. (set #program "XFDDecrunch")
  54. (P_chkrun)
  55.  
  56. (set @default-dest
  57.   (askdir
  58.     (prompt ("Where should \"%s\" installed ?\nA drawer \"%s\" will automatically created." @app-name @app-name))
  59.     (help @askdir-help)
  60.     (default @default-dest)
  61.     (disk)
  62.   )
  63. )
  64. (set #dest (tackon @default-dest @app-name))
  65. (if
  66.   (exists #dest)
  67.   (
  68.     (set #choice
  69.       (askbool
  70.         (prompt ("\nDirectory \"%s\" already exists.\n Should it be deleted ?" #dest))
  71.         (default 1)
  72.         (choices "Delete" "Skip")
  73.         (help @askbool-help)
  74.       )
  75.     )
  76.     (if
  77.       (= #choice 1)
  78.       (run ("Delete \"%s\" \"%s.info\" All" #dest #dest))
  79.     )
  80.   )
  81. )
  82. (makedir #dest
  83.   (help @makedir-help)
  84.   (infos)
  85. )
  86.  
  87. ;----------------------------
  88.  
  89. (copyfiles
  90.   (help @copyfiles-help)
  91.   (source ("%s.slave" @app-name))
  92.   (dest #dest)
  93. )
  94. (if
  95.   (exists ("%s.newicon" @app-name))
  96.   (set #icon
  97.     (askchoice
  98.       (prompt "\nWhich icon do you like to install ?\n")
  99.       (default 0)
  100.       (choices "Normal" "NewIcon")
  101.       (help @askchoice-help)
  102.     )
  103.   )
  104.   (set #icon 0)
  105. )
  106. (select #icon
  107.   (set #icon ("%s.inf" @app-name))
  108.   (set #icon ("%s.newicon" @app-name))
  109. )
  110. (copyfiles
  111.   (help @copyfiles-help)
  112.   (source #icon)
  113.   (newname ("%s.info" @app-name))
  114.   (dest #dest)
  115. )
  116. (if
  117.   (exists #readme-file)
  118.   (copyfiles
  119.     (help @copyfiles-help)
  120.     (source #readme-file)
  121.     (dest #dest)
  122.   )
  123. )
  124. (if
  125.   (exists ("%s.info" #readme-file))
  126.   (copyfiles
  127.     (help @copyfiles-help)
  128.     (source ("%s.info" #readme-file))
  129.     (dest #dest)
  130.   )
  131. )
  132. (if
  133.   (= #sub-dir "")
  134.   ("")
  135.   (
  136.     (set #dest (tackon #dest #sub-dir))
  137.     (makedir #dest
  138.       (help @makedir-help)
  139.     )
  140.   )
  141. )
  142.  
  143. ;----------------------------
  144.  
  145. (set #AD_disk "INTRO")
  146. (P_disk)
  147.  
  148. (copyfiles
  149.   (help @copyfiles-help)
  150.   (source ("%s:" #AD_disk))
  151.   (dest #dest)
  152.   (all)
  153. )
  154.  
  155. (run ("cd \"%s\"\nxfdDecrunch LOAD" #dest))
  156.  
  157. (exit)
  158.